Common data carriers in a storage field are a mechanical hard disk and a solid-state drive (SSD). Because the SSD has such advantages as high performance, a low delay, low power consumption, and powerful environmental adaptability and also costs of the SSD are on the decrease, the SSD is applied more widely at present.
The SSD is generally formed by an NAND flash chip. It has inherent problems such as bit transition and read interference, which causes errors of read data, and also has a limitation of erase and write times. Therefore, measures are taken to ensure reliability of the structure of the NAND flash chip and the SSD design. For example, the NAND flash chip includes one or more wafers inside, where each wafer includes multiple planes; each plane includes multiple blocks, and each block includes multiple pages.
A page is a basic unit of reading and writing data, and includes multiple bytes (for example, 2048+64 bytes), where every 512 bytes+16 bytes represent one error detection/error correction unit, where 512 bytes are used to store data and 16 bytes are used to store error detection/error correction codes. When data is read, each unit of 512+16 bytes performs check; if only few bits have errors, the errors may be corrected; if too many bits have errors and the errors cannot be corrected, an upper layer error correction mechanism, for example, a redundant array of independent disks (RAID) algorithm needs to be used to solve the errors.
A block of the NAND flash chip is a basic erasing unit, and each block includes multiple pages (for example, 64 pages). To modify data that has already been written to the flash chip, a block where the data is located must be first erased before new data is written to the flash chip. This is a basic feature of the flash chip.
During the working process, the SSD needs to execute an erase or write operation constantly, while the flash chip is in a busy state (which is represented by using a hardware pin R/B# of the chip; a high level represents a ready state, and a low level represents a busy state) when these two operations are executed, and therefore cannot further respond to the read operation. The read operation can be continued only after the erase or write operation is completed. Erasing a block of the NAND flash chip generally requires 3 milliseconds (ms), a write operation generally requires 900 microseconds (us), while a read operation generally requires only 50 us. In this way, the erase and write operations block the read operation, which causes a large read latency and affects performance of the storage system. This phenomenon is more obvious in a scenario where there are extremely frequent erase or write operations.